const { defineConfig } = require('@vue/cli-service')
const path = require('path')
function resolve(dir) {
  return path.join(__dirname, dir)
}
module.exports = defineConfig({
  lintOnSave: false,
  transpileDependencies: true,
  configureWebpack: {
    name: '合同系统',
    resolve: {
      alias: {
        '@': resolve('src')
      }
    }
  },
  // 网页标题
  chainWebpack: (config) => {
    config.plugin("html").tap((args) => {
      args[0].title = "样品检测全流程管理系统";
      return args;
    });
  },
  devServer: {
    client: {
      overlay: false,
    },
    proxy: {
      '/tent': {
        target: 'http://192.168.10.87:8284',
        changeOrigin: true,
        pathRewrite: {
          '^/tent': ''
        }
      }
    }
  },
  configureWebpack: {
    resolve: {
      fallback: {
        path: require.resolve('path-browserify'),
      },
    },
  },
})
